package com.fjnu.dao;

import com.fjnu.dto.UserConditionDto;
import com.fjnu.entity.User;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

        int insert(User newUser);

        int insertUserRole(Integer userId, Integer roleId);

        int batchInsertUserRoles(Integer userId,List<Integer> roleIds);

        int updatePassword(Integer userId,
                           String newPassword);
        int updateScore(Integer userId, Long incremetedScore);

        User selectByNameAndPwd(String username, String password);

        List<User> selectByCondition(UserConditionDto UserConditionDto);

        List<User> selectByConditionWithLimit(UserConditionDto UserConditionDto, Integer startIndex, Integer endIndex);



}
